package com.vlin.controller.tuya;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class TuyaController {

	/*
	 * @Autowired TuyaService tuyaService;
	 */
	
	@RequestMapping("users")

	public String getUser() {
		/*
		 * String result =
		 * tuyaService.getUsers(String.valueOf(page),String.valueOf(limit)); return
		 * result;
		 */
		return "index";
		/*
		 * JSONObject res = new JSONObject(); res.put("code", 0); res.put("msg",
		 * "success");
		 * 
		 * JSONObject body = new JSONObject(result); if(body.getBoolean("success")) {
		 * JSONObject trueResult = body.getJSONObject("result"); JSONArray data =
		 * trueResult.getJSONArray("list"); map.put("list",data.toList()); } return
		 * "index";
		 */
	}
	
	@RequestMapping("{temp}")
	public String temp(@PathVariable(name = "temp") String temp) {
		/*
		 * String result =
		 * tuyaService.getUsers(String.valueOf(page),String.valueOf(limit)); return
		 * result;
		 */
		return temp;
		/*
		 * JSONObject res = new JSONObject(); res.put("code", 0); res.put("msg",
		 * "success");
		 * 
		 * JSONObject body = new JSONObject(result); if(body.getBoolean("success")) {
		 * JSONObject trueResult = body.getJSONObject("result"); JSONArray data =
		 * trueResult.getJSONArray("list"); map.put("list",data.toList()); } return
		 * "index";
		 */
	}


}
